<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta charset="utf-8" />
		<title>录入用户户信息 - 产品报价管理系统</title>
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta content="Premium Multipurpose Admin & Dashboard Template" name="description" />
		<meta content="" name="author" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />

		<!-- App favicon -->
		<link rel="shortcut icon" href="../assets/images/favicon.ico">

		<!-- App css -->
		<link href="../assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
		<link href="../assets/css/jquery-ui.min.css" rel="stylesheet">
		<link href="../assets/css/icons.min.css" rel="stylesheet" type="text/css" />
		<link href="../assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />
		<link href="../assets/css/app.min.css" rel="stylesheet" type="text/css" />

	</head>

	<body class="dark-topbar dark-sidenav">

		<!-- Top Bar Start -->
		<div th:replace="~{/common/top::top}"></div>
		<!-- Top Bar End -->


		<!-- Left Sidenav -->
		<div th:replace="~{/common/left-side-nav::left-side-nav}"></div>

		<!-- end left-sidenav-->

		<div class="page-wrapper">
			<!-- Page Content-->
			<div class="page-content">

				<div class="container-fluid">
					<!-- Page-Title -->
					<div class="row">
						<div class="col-sm-12">
							<div class="page-title-box">
								<h4 class="page-title">用户信息录入</h4>
							</div>
							<!--end page-title-box-->
						</div>
						<!--end col-->
					</div>
					<!-- end page title end breadcrumb -->

					<div class="row">
						<div class="col-lg-12">
							<div class="card">
								<div class="card-body">
									<div class="row">
										<div class="col-lg-12">
											<form th:action="@{/user/user_add}" method="post"
											class="needs-validation" novalidate>
												<div class="form-group row">
													<label for="name"
														class="col-sm-2 col-form-label text-right">用户名</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" required maxlength="50"
															   th:value="${user != null ? user.name :''}"
															   name="name"
															id="name">
														<div class="invalid-feedback">用户名不能为空，并且不能超过50字</div>
														<div class="text-danger mt-2"
															 th:text="${errorMessages!=null and errorMessages.containsKey('name') ? errorMessages.name:''}">错误信息</div>


													</div>
												</div>
												<div class="form-group row">
													<label for="password"
														class="col-sm-2 col-form-label text-right">密码</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value=""
															   th:value="${user != null ? user.password :''}"
															   name="password"
															id="password">
														<div class="invalid-feedback">用户名密码不能为空，并且不能超过50字</div>
														<div class="text-danger mt-2"
															 th:text="${errorMessages!=null and errorMessages.containsKey('password') ? errorMessages.password:''}">错误信息</div>
													</div>
												</div>
												<div class="form-group row">
													<label for="level"
														class="col-sm-2 col-form-label text-right">用户等级</label>
													<div class="col-sm-8">
														<input class="form-control" type="text" value="" required maxlength="100"
															   th:value="${user != null ? user.level :''}"
															   name="level"
															id="level">
<!--														<div class="invalid-feedback">用户等级不能为空，并且不能超过50字</div>-->
														<div class="text-danger mt-2"
															 th:text="${errorMessages!=null and errorMessages.containsKey('level') ? errorMessages.level:''}">错误信息</div>
													</div>
												</div>

												<div class="row">
													<div class="col-sm-10 ml-auto">
														<button type="submit"
															class="btn btn-gradient-primary">保存</button>
														<button type="button"
															class="btn btn-gradient-danger">重置</button>
													</div>
												</div>
											</form>
										</div>
									</div>
								</div>
								<!--end card-body-->
							</div>
							<!--end card-->
						</div>
						<!--end col-->
					</div>
					<!--end row-->

				</div><!-- container -->
				<!--end footer-->
			</div>
			<!-- end page content -->
		</div>
		<!-- end page-wrapper -->




		<!-- jQuery  -->
		<script src="../assets/js/jquery.min.js"></script>
		<script src="../assets/js/bootstrap.bundle.min.js"></script>
		<script src="../assets/js/metismenu.min.js"></script>
		<script src="../assets/js/waves.js"></script>
		<script src="../assets/js/feather.min.js"></script>
		<script src="../assets/js/jquery.slimscroll.min.js"></script>
		<script src="../assets/js/jquery-ui.min.js"></script>

		<!-- App js -->
		<script src="../assets/js/app.js"></script>
<!--<script>-->
<!--	$('form.needs-validation').submit(function (event) {-->
<!--		if(this.checkValidity()===false){-->
<!--			$(this).addClass('was-validated')-->
<!--			return false;-->
<!--		}-->
<!--		return true;-->

<!--	})-->
<!--</script>-->
	</body>

</html>
